//
//  GCMHTTableViewCell.m
//  GeeCityManager
//
//  Created by 聚城科技 on 16/8/9.
//  Copyright © 2016年 聚城科技. All rights reserved.
//

#import "GCMHTTableViewCell.h"

@implementation GCMHTTableViewCell{

    UIView *_bgView;
    UILabel *_contentLabel;
    UILabel *_numberLabel;
    UILabel *_timeLabel;
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self createUI];
    }
    return self;
}

-(void)createUI{
    
    _bgView = [[UIImageView alloc]init];
    _bgView.frame =CGRectMake(10, 5,SCREEN_WIDTH - 20, 50);
    _bgView.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:_bgView];
    
    _contentLabel = [[UILabel alloc]init];
    _contentLabel.frame = CGRectMake(20,10,_bgView.bounds.size.width - 40, 30);
    _contentLabel.font = [UIFont systemFontOfSize:15];
//    _contentLabel.backgroundColor = [UIColor redColor];
    _contentLabel.textAlignment = NSTextAlignmentLeft;
    [_bgView addSubview:_contentLabel];
    
//    _numberLabel = [[UILabel alloc]init];
//    _numberLabel.frame = CGRectMake(10 ,40 , _bgView.bounds.size.width - 40, 30);
//    _numberLabel.font = [UIFont systemFontOfSize:13];
//    _numberLabel.textColor = [UIColor colorWithRed:0.58 green:0.65 blue:0.65 alpha:1.00];
//    _numberLabel.textAlignment = NSTextAlignmentLeft;
//    [_bgView addSubview:_numberLabel];
//    
//    _timeLabel = [[UILabel alloc]init];
//    _timeLabel.frame = CGRectMake(10 ,40 , _bgView.bounds.size.width - 40, 30);
//    _timeLabel.font = [UIFont systemFontOfSize:13];
//    _timeLabel.textColor = [UIColor colorWithRed:0.58 green:0.65 blue:0.65 alpha:1.00];
//    _timeLabel.textAlignment = NSTextAlignmentRight;
//    [_bgView addSubview:_timeLabel];
    
}

-(void)setDic:(NSDictionary *)dic{

    NSDictionary *dict = [[NSDictionary alloc]init];
    dict  = dic;
    _contentLabel.text = [dict valueForKey:@"name"];
//    _numberLabel.text = [NSString stringWithFormat:@"合同号:%@",[dict valueForKey:@"hId"]];
//    _timeLabel.text = @"2016-08-10";
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end

